class CreateMarkedEntries < ActiveRecord::Migration
  def self.up
    create_table :marked_entries do |t|
      t.column :entry_id, :integer
      t.column :user_id, :integer
      t.column :created_at, :datetime
    end

    add_index :marked_entries, [:entry_id, :user_id], :name => 'index_marked_entries_entry_id_user_id'
    
  end
  
  def self.down
    remove_index :marked_entries, :name => 'index_marked_entries_entry_id_user_id'
    drop_table :marked_entries
  end
end
